<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var appendDiv = function (callback) {
        for (var i = 0; i < 100; i++) {
            var div = document.createElement('div');
            div.innerHTML = `这个是第${i}div`;
            document.body.appendChild(div);
            if (typeof callback === 'function') {
                callback(div)
            }
        }}
        appendDiv(function (node) {
            node.style.display = 'none'
        })
</script>
</body>
</html>